package gui.ClassroomMenu.exceptions;

import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;

import javax.swing.WindowConstants;
import org.jdesktop.application.Application;
import javax.swing.JFrame;
import javax.swing.JLabel;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class NoData extends javax.swing.JPanel {


	private JFrame 	frame;
	private JLabel jLabel1;
	private JButton ok;
	/**
	* Auto-generated main method to display this 
	* JPanel inside a new JFrame.
	*/
	public static void main(String[] args) {
		JFrame frame = new JFrame();
		frame.getContentPane().add(new NoSelection());
		frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		frame.pack();
		frame.setVisible(true);
	}
	
	public NoData() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		frame = new JFrame();
		frame.getContentPane().add(this);
		frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		frame.pack();
		frame.setSize(234, 120);
		frame.setTitle("Error");
		frame.setVisible(true);
		frame.setPreferredSize(new java.awt.Dimension(234, 120));
		try {
			this.setPreferredSize(new java.awt.Dimension(218, 93));
			this.setLayout(null);
			{
				ok = new JButton();
				this.add(ok);
				ok.setName("ok");
				ok.setBounds(65, 44, 77, 21);
				ok.setText("OK");
				ok.addActionListener(new closeA());
			}
			{
				jLabel1 = new JLabel();
				this.add(jLabel1);
				jLabel1.setText("There is information missing");
				jLabel1.setBounds(29, 18, 185, 14);
			}
			Application.getInstance().getContext().getResourceMap(getClass()).injectComponents(this);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public class closeA implements ActionListener{

		public void actionPerformed(ActionEvent e) {
			// TODO Auto-generated method stub
			frame.dispose();
		}
		
	}
}